import React, { useState } from 'react';
/** react-hooks */
const Index = () => {
    const [count, AddCount] = useState(0);
    const [str, setStr] = useState('react')
    const change = () => {
        setStr('change')
    }
    return (
        <div>
            <p>{count}</p>
            <p onClick={change}>{str}</p>
            <button onClick={() => { AddCount(count + 1) }}>增加</button>
        </div>
    );
}

export default Index;